package com.kc.business.service.impl;

import com.kc.business.domain.BizCelebrity;
import com.kc.business.mapper.BizCelebrityMapper;
import com.kc.business.mapper.BizUserMapper;
import com.kc.business.service.IBizCelebrityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO
 *
 * @author zhangshuo
 * @version 1.0
 * @date 2020/9/10
 */
@Service
public class BizCelebrityServiceImpl implements IBizCelebrityService {

    @Autowired
    BizCelebrityMapper bizCelebrityMapper;
    @Autowired
    BizUserMapper bizUserMapper;

    /**
     * 名家入驻列表
     *
     * @param bizCelebrity
     * @return
     */
    @Override
    public List<BizCelebrity> getList(BizCelebrity bizCelebrity) {
        return bizCelebrityMapper.select(bizCelebrity);
    }

    /**
     * 新增名家入驻申请
     *
     * @param bizCelebrity
     * @return
     */
    @Override
    public int add(BizCelebrity bizCelebrity) {
        return bizCelebrityMapper.insertSelective(bizCelebrity);
    }

    /**
     * 名家入驻审核
     *
     * @param bizCelebrity
     * @return
     */
    @Override
    public int edit(BizCelebrity bizCelebrity) {
        return bizCelebrityMapper.updateByPrimaryKeySelective(bizCelebrity);
    }
}
